package com.hujifang.elasticsearch.model;

import java.io.Serializable;
import java.util.List;

public class EsField implements Serializable{

    private static final long serialVersionUID = -5487706854586205438L;
    /**
     * 字段名称
     */
    private String fieldName;
    /**
     * 字段类型 integer,double,float,string,date,boolean,null
     */
    private String type="string";
    /**
     * 拷贝到哪个字段
     */
    private String copyTo;
    /**
     * 多字段从属性
     */
    private List<EsField> fields;
    /**
     *字段为空时替换值
     */
    private Object nullValue;
    /**
     * 是否存储　yes,no
     */
    private String store="true";
    /**
     * 是否分词
     * no 不分词，不可搜索
     * analyzed 分词可搜索
     * not_analyzed  不分词可搜索
     */
    private String index="analyzed";
    /**
     * 分词解析器
     */
    private String indexAnalyzer;
    /**
     * 搜索解析器
     */
    private String searchAnalyzer;

    public String getFieldName() {
        return fieldName;
    }
    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getStore() {
        return store;
    }
    public void setStore(String store) {
        this.store = store;
    }
    public String getIndex() {
        return index;
    }
    public void setIndex(String index) {
        this.index = index;
    }
    public String getIndexAnalyzer() {
        return indexAnalyzer;
    }
    public void setIndexAnalyzer(String indexAnalyzer) {
        this.indexAnalyzer = indexAnalyzer;
    }
    public String getSearchAnalyzer() {
        return searchAnalyzer;
    }
    public void setSearchAnalyzer(String searchAnalyzer) {
        this.searchAnalyzer = searchAnalyzer;
    }

    public String getCopyTo() {
        return copyTo;
    }

    public void setCopyTo(String copyTo) {
        this.copyTo = copyTo;
    }

    public Object getNullValue() {
        return nullValue;
    }

    public void setNullValue(Object nullValue) {
        this.nullValue = nullValue;
    }

    public List<EsField> getFields() {
        return fields;
    }

    public void setFields(List<EsField> fields) {
        this.fields = fields;
    }
}
